/**
 * @file
 * @brief BSP IMU
 *
 * This file offers API for basic IMU operations.
 * 
 *
 * 
 */

#pragma once

#include "esp_err.h"


typedef struct
{
    struct {
        float x,y,z;
    }acc;
    struct {
        float x,y,z;
    }gyro;
    struct {
        float x,y,z;
    }mag;
    struct {
        float yaw,pitch,roll;
    } euler;
}imu_data_t;

typedef struct
{
    uint32_t step_counter;
    uint8_t activity;

    uint8_t wrist_gesture;
    uint8_t wrist_wear_wakeup;
}imu_motion_data_t;

esp_err_t imu_init(void);

esp_err_t imu_deinit(void);

imu_data_t *imu_get_data_ptr(void);

imu_motion_data_t *imu_get_motion_ptr(void);

esp_err_t imu_enable_sensors(uint8_t sensors[], size_t num_sensors);

esp_err_t imu_disable_sensors(uint8_t sensors[], size_t num_sensors);

esp_err_t imu_enable_features(void);

esp_err_t imu_disable_features(void);

esp_err_t imu_get_sensor_data(void);

esp_err_t imu_get_feature_data(void);

